package com.fast.linkbeanadmin.exception;

import com.fast.linkbeanadmin.enums.CodeEnum;

/**
 * @author ruan cai yuan
 * @version 1.0
 * @fileName com.fast.linkbeanadmin.exception.BusinessException
 * @description: 封装业务异常抛出
 * @since 2024/7/21 下午3:39
 */
public class BusinessException extends RuntimeException {

    private Integer code;

    public BusinessException(String msg) {
        super(msg);
    }

    public BusinessException(CodeEnum codeEnum) {
        super(codeEnum.getMsg());
        this.code = codeEnum.getCode();
    }
}
